/* 
 * File:   F04.h
 * Author: jcrada
 *
 * Created on 23 July 2011, 12:58 PM
 */

#ifndef JRV_F04_H
#define	JRV_F04_H

#include "ecb/base/Problem.h"

#include "ecb/function/Sphere.h"

namespace ecb {
    namespace jrv11 {

        class F04 : public Problem {
        private:
            Problem* sphere;
        public:

            F04(int dimensions)
            : Problem("F04", "Sphere", dimensions,
            -5.12, 5.12, true) {
                sphere = new Sphere;
            }

            ~F04() {
                delete sphere;
            }

            scalar f(const std::vector<scalar>& x) {
                return sphere->f(x);
            }
        };
    }
}

#endif	/* JRV_F04_H */

